﻿//  Copyright (c) 2011 Ray Liang (http://www.dotnetage.com)
//  Licensed MIT: http://www.opensource.org/licenses/mit-license.php

using System.Linq;

namespace DNA.Mvc
{
    /// <summary>
    /// Define the friend repository methods.
    /// </summary>
    public interface IFriendRepository:IRepository<Friend>
    {
        /// <summary>
        /// Find the firend by name.
        /// </summary>
        /// <param name="userName">The user name.</param>
        /// <param name="friendName">The friend name.</param>
        /// <returns></returns>
        Friend Find(string userName, string friendName);

        /// <summary>
        /// Returns the user's friends
        /// </summary>
        /// <param name="userName">The user name.</param>
        /// <returns></returns>
        IQueryable<Friend> GetMyFriends(string userName);

        IQueryable<Friend> GetMyFriends(string userName, int pageIndex, int pageSize, out int totalRecords);

        IQueryable<string> GetMyFollowers(string userName);

        IQueryable<string> GetMyFollowers(string userName, int pageIndex, int pageSize, out int totalRecords);

        IQueryable<string> GetMyFollows(string userName);

        IQueryable<string> GetMyFollows(string userName, int pageIndex, int pageSize, out int totalRecords);

        IQueryable<Friend> GetBadGuys(string userName);

        IQueryable<Friend> GetFriendsWatingFor(string userName);

        IQueryable<Friend> GetFriendsWatingFor(string userName, int pageIndex, int pageSize, out int totalRecords);
    }
}
